package com.wangtongxiao.beans;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
public class MyApp1 {
    public static void main(String[] args) {
        String temp = "";
        char[] chars = new char[1024*1024*10];
        String path="d:\\abc.txt";
        try {
            FileReader fileReader = new FileReader(path);
            int read=0;
            StringBuffer stringBuffer = new StringBuffer();
            while ((read = fileReader.read(chars,0,chars.length))!=-1){
                String aaa = new String(chars,0,read);
                stringBuffer.append(aaa);
            }
            temp = stringBuffer.toString();
            fileReader.close();
        } catch (FileNotFoundException e) {
            e.printStackTrace();
        } catch (IOException e) {
            e.printStackTrace();
        }
        System.out.println(temp);
    }
}
